/*
 * Position.cpp
 *
 *  Created on: 5 nov. 2008
 *      Author: Administrateur
 */
#include"header/Position.h"

/**
 * Use to compare the position of the instance with another
 */
bool Position::isEqual(Position const& p) const {
	if (x == p.x && y == p.y)
		return true;
	return false;
}

/**
 * Use to compare the position of the instance with x,y
 */
bool Position::isEqual(int const& _x, int const& _y) const {
	if (x == _x && y == _y)
		return true;
	return false;
}

/**
 * Set a new coordinates
 */
void Position::position(int const& _x, int const& _y) {
	x = _x;
	y = _y;
}

/**
 * Get the coordinate X
 */
int const& Position::X() const {
	return x;
}

/**
 * Get the coordinate Y
 */
int const& Position::Y() const {
	return y;
}


